#ifndef __HID_H
#define __HID_H

#include <stdint.h>

#if defined __cplusplus
extern "C" {
#endif

	void get_hid_enable(uint16_t handle, uint8_t **pCmd, uint8_t *size);

	typedef struct tagPS3_data
	{
		uint8_t	report_id;
		union {
			struct{
				uint8_t	LAnalogX;			//0 LAnalogX 
				uint8_t	LAnalogY;			//1 LAnalogY 
				uint8_t	RAnalogX;			//2 RAnalogX 
				uint8_t	RAnalogY;			//3 RAnalogY 
				uint8_t	dummy_04;			//equals 41? 
				uint8_t	dummy_05;			//equals 45? 
				int	Triangle : 1;			//6 Button flag - Triangle(0x01) Circle(0x02) Cross(0x04) Cube(0x08) L2(0x10) R2(0x20) L1(0x40) L1(0x80) 
				int	Circle : 1;
				int	Cross : 1;
				int	Cube : 1;
				int	L2 : 1;
				int	R2 : 1;
				int	L1 : 1;
				int	R1 : 1;
				int	Select : 1;			//7 Button flag - Select(0x01) LAnalogClick(0x02) RAnalogClick(0x04) Start(0x08) Up(0x10) Right(0x30) Down(0x50) Left(0x70) 
				int	LAnalogClick : 1;
				int	RAnalogClick : 1;
				int	Start : 1;
				int	Pad : 4;
				uint8_t	dummy_08;			//8  
				uint8_t	dummy_09;			//9  
				uint8_t	dummy_10;			//10  
				uint8_t	dummy_11;			//11  
				uint8_t	dummy_12;			//12  
				uint8_t	UpAnalog;			//13 Up Analog (0x00 to 0xFF) 
				uint8_t	RightAnalog;		//14 Right Analog (0x00 to 0xFF) 
				uint8_t	DownAnalog;			//15 Down Analog (0x00 to 0xFF) 
				uint8_t	LeftAnalog;			//16 Left Analog (0x00 to 0xFF) 
				uint8_t	L2Analog;			//17 L2 Analog (0x00 to 0xFF) 
				uint8_t	R2Analog;			//18 R2 Analog (0x00 to 0xFF) 
				uint8_t	L1Analog;			//19 L1 Analog (0x00 to 0xFF) 
				uint8_t	R1Analog;			//20 R1 Analog (0x00 to 0xFF) 
				uint8_t	TriangleAnalog;		//21 Triangle Analog (0x00 to 0xFF) 
				uint8_t	CircleAnalog;		//22 Circle Analog (0x00 to 0xFF) 
				uint8_t	CrossAnalog;		//23 Cross Analog (0x00 to 0xFF) 
				uint8_t	CubeAnalog;			//24 Cube Analog (0x00 to 0xFF) 
				uint8_t	dummy_25;			//25  
				uint8_t	dummy_26;			//26  
				uint8_t	dummy_27;			//27  
				uint8_t	dummy_28;			//28  
				uint8_t	dummy_29;			//29  
				uint8_t	dummy_30;			//30  
				uint8_t	dummy_31;			//31  
				uint8_t	dummy_32;			//32  
				uint8_t	dummy_33;			//33  
				uint8_t	dummy_34;			//34  
				uint8_t	dummy_35;			//35  
				uint8_t	dummy_36;			//36  
				uint8_t	dummy_37;			//37  
				uint8_t	dummy_38;			//38  
				uint8_t	dummy_39;			//39  
				uint8_t	Motion_X_H;			//40 Motion X(H) 
				uint8_t	Motion_X_L;			//41 Motion X(L) 
				uint8_t	Motion_Y_H;			//42 Motion Y(H) 
				uint8_t	Motion_Y_L;			//43 Motion Y(L) 
				uint8_t	Motion_Z_H;			//44 Motion Z(H) 
				uint8_t	Motion_Z_L;			//45 Motion Z(L) 
			} ps3_report;
			uint8_t	dummy[49];
		} ps3_union;
	} PS3_data;
#if defined __cplusplus
}
#endif

#endif // __HID_H